package org.easymodelers.gmf.creator.template;

import org.easymodelers.gmf.utils.ModelsManager;
import org.easymodelers.template.NamespaceData;
import org.easymodelers.template.TemplateHandler;
import org.eclipse.gmf.gmfgraph.Canvas;
import org.eclipse.gmf.gmfgraph.GMFGraphFactory;

public abstract class AbstractGraphTemplateBasedElementDefinitionHandler extends AbstractTemplateBasedElementDefinitionHandler {

	protected void initializeTemplateHandler(TemplateHandler templateHandler, ModelsManager modelsManager) {
		Canvas canvas = modelsManager.getCanvas();

		templateHandler.registerDefaultNamespaces();
		String[] graphEnumPackages = { "org.eclipse.gmf.gmfgraph" };
		templateHandler.registerNamespace(
							new NamespaceData("gmfgraph", "http://www.eclipse.org/gmf/2006/GraphicalDefinition",
									GMFGraphFactory.eINSTANCE, canvas, graphEnumPackages));
	}
}
